.PHONY: all clean

CFLAGS = -Wall -g0 -O0

lib_objects = token.o errors.o zepto.o reader.o writer.o alloc.o builtins.o \
	environment.o eval.o stream.o symbols.o \
	lib/io.o lib/math.o lib/logic.o \
	lib/equality.o lib/string.o

app_objects = app.o

clean_objects = $(lib_objects) $(app_objects) libzs.a app

%.o: %.c
	gcc $(CFLAGS) -c $(EXTRFL) -o $@ $^

all: app

libzs.a: $(lib_objects)
	ar rc libzs.a $(lib_objects)

app: libzs.a $(app_objects)
	gcc $(app_objects) libzs.a -o app

clean: FORCE
	rm -f $(clean_objects)


FORCE:

